package com.edu.exam.enums.grading;

/**
 * 审核统计类型枚举
 */
public enum AuditStatType {
    EFFICIENCY("EFFICIENCY", "效率统计"),
    WORKLOAD("WORKLOAD", "工作量统计"),
    QUALITY("QUALITY", "质量统计"),
    TIME("TIME", "时间统计"),
    TREND("TREND", "趋势统计"),
    OVERVIEW("OVERVIEW", "总览统计");

    private final String code;
    private final String description;

    AuditStatType(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    public static AuditStatType fromCode(String code) {
        for (AuditStatType type : values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return EFFICIENCY; // 默认返回效率统计
    }
}